public class Sum1to100 {
    public static void main(String[] args){
        Sum1 mySum1 = new Sum1();
        Sum2 mySum2 = new Sum2();
        mySum1.sum100();
        mySum2.sum100();
        System.out.println("HelloWorld!");

    }
}
class Sum1{
    protected static int sum=0;
    protected int i=1;
    protected void sum100(){
        for (sum=0;i<=100;i++){
            sum+=i;
        }
        System.out.println(sum);
    }
}
class Sum2{
    protected static int sum=0;
    protected int i=100;
    protected void sum100(){
       sum=(1+100)*50;
        System.out.println(sum);
    }


}